/**
 * 模版
 *
 * @export
 * @class TemplateTool
 */
export default class TemplateTool {

	/**
	 * 创建一个EUI皮肤模板文件
	 */
	public static createEUIExmlSkin(states: string, initWidth: string, initHeight: string, _className: string): string {
		const xml: string = `<?xml version='1.0' encoding='utf-8'?>
	<e:Skin class="${_className}"${!states ? '' : ' states="' + states.toString() + '"'} width="${initWidth}" height="${initHeight}" xmlns:ns1="*" xmlns:solar="solar.*" xmlns:e="http://ns.egret.com/eui">
${_className.indexOf("Panel") === 0 ? `	<e:Image id="rect" source="rect_1_png" left="0" right="0" top="0" bottom="0" />
	<e:Group id="contentNode" verticalCenter="0" horizontalCenter="0"/>` : `${_className.indexOf("Full") === 0 ? `<e:Image source="img_common_bottom_png" bottom="-80" horizontalCenter="0"/>
	<solar:Component skinName="CommonTopHeadSkin" top="0" left="0" right="0"/>
	<solar:Button notice="common.close" left="15" bottom="7" skinName="BtnClose2Skin"/>
	<ns1:BoxChatView skinName="CommonChatSkin" horizontalCenter="0" bottom="111"/>`: ''}`}
</e:Skin>`;
		return xml;
	}

	/**
	 * 生成默认wingproperties
	 */
	public static getWingProperties(): any {
		return { theme: 'resource/default.thm.json', resourcePlugin: { configs: [{ configPath: 'resource/default.res.json', relativePath: 'resource/' }] } };
	}
}